import React from 'react'
import { useTranslation } from 'react-i18next'
export default function TestI18n() {
    const { t, i18n } = useTranslation(['app'])
    return (
        <div>
            <button onClick={()=>{
                i18n.changeLanguage('en')
            }}>英文</button>
            <button onClick={()=>{
                i18n.changeLanguage('zh')
            }}>中文</button>
            <div>
                {t('hello')}
                {t('sz')}
            </div>
        </div>
    )
}
